package com.wyh.domain.vo.groupOne.threemeterTree.manageTableThreemeter;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Api("用于展示在三表管理界面表格上的三表VO")
@Builder
public class ManageThreemeterVO {
    @ApiModelProperty(value = "三表表的主键",required = true)
    @NotNull(message="[三表的id]不能为空")
    private Integer id;

    @NotNull(message="[三表性质]不能为空")
    @ApiModelProperty(value = "三表性质，0水表、1电表、2气表",required = true)
    private Integer nature;

    @ApiModelProperty("资源信息")
    private String infoName;

    @NotBlank(message = "[三表编号]不能为空或者空字符串")
    @Length(min = 1,max = 30,message = "编号为1-30个字符")
    @ApiModelProperty(value = "三表编号",required = true)
    private String number;

    @NotBlank(message = "[三表名称]不能为空或者空字符串")
    @Length(min = 1,max = 30,message = "名称为1-30个字符")
    @ApiModelProperty(value = "三表名称",required = true)
    private String name;

    @ApiModelProperty("倍率,这里传递是字符串类型的")
    private String multiplier;

    @ApiModelProperty("最后修改人")
    private String updateUser;

    @ApiModelProperty("最后修改人手机号")
    private String phoneNumber;

    @ApiModelProperty("最后修改时间")
    private LocalDateTime time;

    @NotNull(message = "[初始读数]不能为空")
    @ApiModelProperty(value = "初始读数",required = true)
    private Double initial;

    @ApiModelProperty("二维码")
    private String code;

    @Size(max = 50 , message = "备注长度不能超过50个字符")
    @ApiModelProperty("备注")
    private String remarks;
}
